
public class Date {
    public int year;
    public int month ;
    public int day;
 /*   public Date() {
        year = 2021;
        month = 11;
        day = 11;
        System.out.println("调用了构造方法。。。");
    }*/

    public Date(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }

    public void setDate(int year, int month, int day) {
        this.year = year;
        this.month = month;
        this.day = day;
    }
    public void printDate() {
        System.out.println( year + "年" + month + "月" + day + "日 ");
    }
    public static void main(String[] args) {

       // Date date = new Date(1111,11,11);

       // Date date2 = new Date(1111,11,11);



       /* System.out.println(date.day);
        System.out.println(date.month);
        System.out.println(date.year);
       *//* date.setDate(2023,11,11);
        date.printDate();
        System.out.println("------------------");
        date.setDate(2020,11,11);
        date.printDate();*/

    }
}
